package com.lyj.model;

import java.util.Set;

import com.lyj.utils.DateUtil;

/**
* 
* @author 李艺江
* @version 创建时间：2019年5月6日 下午10:15:07
*/

public class Questionnaire {

	private Integer id;
	private String title;
	private String description;
	private Integer surveyTime;
	private Long createTime;
	private Integer isUsed;
	private Set<Record> records;
	private Set<Question> questions;
	
	private String createTimeView;
	private int isSurvey = 0;
	private int questionsCount;
	
	public Questionnaire() {
		
	}

	public Questionnaire(String title, String description, Integer surveyTime, Long createTime, Integer isUsed) {
		super();
		this.title = title;
		this.description = description;
		this.surveyTime = surveyTime;
		this.createTime = createTime;
		this.isUsed = isUsed;
	}

	public Questionnaire(String title, String description, Integer surveyTime, Long createTime, Integer isUsed,
			Set<Record> records, Set<Question> questions) {
		super();
		this.title = title;
		this.description = description;
		this.surveyTime = surveyTime;
		this.createTime = createTime;
		this.isUsed = isUsed;
		this.records = records;
		this.questions = questions;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getSurveyTime() {
		return surveyTime;
	}

	public void setSurveyTime(Integer surveyTime) {
		this.surveyTime = surveyTime;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
		this.createTimeView = DateUtil.toLongDate(createTime);
	}

	public Integer getIsUsed() {
		return isUsed;
	}

	public void setIsUsed(Integer isUsed) {
		this.isUsed = isUsed;
	}

	public Set<Record> getRecords() {
		return records;
	}

	public void setRecords(Set<Record> records) {
		this.records = records;
	}

	public Set<Question> getQuestions() {
		return questions;
	}

	public void setQuestions(Set<Question> questions) {
		this.questions = questions;
		this.questionsCount = questions.size();
	}

	public String getCreateTimeView() {
		return createTimeView;
	}

	public int getIsSurvey() {
		return isSurvey;
	}

	public void setIsSurvey(int isSurvey) {
		this.isSurvey = isSurvey;
	}

	public int getQuestionsCount() {
		return questionsCount;
	}

}
